package com.goods.feign.client;

import com.demo.common.entity.Goods;
import com.demo.common.response.Result;
import com.goods.feign.fallback.GoodsServiceClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(
        name = "goods-service",
        contextId = "goodsServiceClient",
        path = "/goods",
        fallbackFactory = GoodsServiceClientFallback.class
)
public interface GoodsServiceClient {

    @GetMapping("/{id}")
    Result getById(@PathVariable("id") Long id);


}
